# -*- coding: utf-8 -*-
# @Time     : 2021/11/30 22:54
# @Author   : wljess
# @File     : demo.py
# @Describe : 
# @Software : PyCharm

from multiprocessing import Process


def task():
    print(f"task is running...")


if __name__ == '__main__':

    p1 = Process(target=task)
    p2 = Process(target=task)
    p3 = Process(target=task)
    p4 = Process(target=task)
    p5 = Process(target=task)
    p1.start()
    p2.start()
    p1.join()
    p2.join()
    p3.daemon = True
    p3.start()
    p4.start()
    p5.start()
    p4.join()
    p5.join()

